/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package testko;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.Statement;

/**
 *
 * @author Heri Setiyawan
 */
public class testko_koneksi {
    public Connection conn;
    public Statement st;
    public String dbname,driver,user,psw;
    
    public void MakeKoneksi(){
        user = "userec";
        psw = "@j3n1f3rl0p3z!";
        driver = "jdbc:mysql://localhost/ecitydb";
        try{
        Class.forName("com.mysql.jdbc.Driver");
        conn = DriverManager.getConnection(driver,user,psw);
        st = conn.createStatement();
        System.out.print("database connected \n");
        }catch(Exception q){
            System.out.print(q);
        }
    }
    
    
}
